//
//  LYouSearchListCell.m
//  LYouSubscribeApp
//
//  Created by grx on 2018/12/13.
//  Copyright © 2018年 grx. All rights reserved.
//

#import "LYouSearchListCell.h"

@implementation LYouSearchListCell

-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.layer.cornerRadius = 5;
        [self creatUI];
    }
    
    return self;
}

-(void)creatUI{
    /** 背景图片 */
    self.bgImage  = [[UIImageView alloc] initWithFrame:self.bounds];
    self.bgImage.layer.cornerRadius = 5;
    self.bgImage.contentMode = UIViewContentModeScaleAspectFill;
    //将多余的部分切掉
    self.bgImage.layer.masksToBounds = YES;
    [self.contentView addSubview:self.bgImage];
}

-(void)setModel:(LYouVideoModel *)model{
    [self.bgImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@", model.thumbnail_url]] placeholderImage:[UIImage imageNamed:@"placeholderimg"]];
}

@end
